package com.baor.controller;


import com.baor.domain.DeviceSalesRentalRewardConfig;
import com.baor.service.RewardService;
import com.baor.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/jlsz")
public class RewardSettingController {

    @Autowired
    private RewardService rewardService;
    @PostMapping("shezhi")

    public R setting( @RequestBody DeviceSalesRentalRewardConfig deviceSalesRentalRewardConfig)

        {
            int row = rewardService.change(deviceSalesRentalRewardConfig);
            if(row>0){
                return R.ok();
            }else{
                return R.er("抱歉修改失败！");
            }
        }

}